<?php 
error_reporting(0);
include_once('connection/connection.php');
include('header.php');
include('menu.php');
include('config.php');
//echo $formId=trim($_REQUEST['formId']);echo "<br>";
//echo $_SESSION['formID'] = trim($_REQUEST['formId']);
$formId=trim($_REQUEST['form_id']);
$_SESSION['formID']=$formId;
//$jsOnLoad="enable_sanc1(false);source_dtls1(".$formId.");showhabit1(".$formId.");";
$jsOnLoad="enable_sanc1(true);source_dtls1(".$formId.");";
function blanck($var)
{
	if($var!="")
	{
   		return $var;
	}
}

function getName($colName,$id)
{
	$sqlgetName="select distinct ".$colName."_name from tbl_lookup_location where ".$colName."_id in(".$id.")";
	$querygetName=mysql_query($sqlgetName);
	while($rowgetName=mysql_fetch_row($querygetName))
	{
		$name=$name." ".$rowgetName[0];
	}

	$name=explode(" ",$name);
	$name=array_filter($name, "blanck");
	return $name=implode($name,",");
}
//$frm=$_SESSION['form_id'];
$qr="select * from tbl_dtls_q1_main where id='$formId'";
$res=mysql_query($qr);
$row=mysql_fetch_array($res);
$dis=$row['district_id'];
$dis_name=getName('district',$dis);
$_SESSION['dis_name']=$dis_name;
$tehsil=$row['tehsil_id'];
$id1=$row['id'];
$_SESSION['id1']=$id1;
$qr1="select census_subdistrict_name from tbl_lookup_location where district_id='$dis' and census_subdistrict_code='$tehsil'";
$res1=mysql_query($qr1);
$row1=mysql_fetch_array($res1);
/*if(isset($_POST['back']))
{ 
	header('Location: view_village_q1.php');
}*/	
if(isset($_POST['submit']))
{
		$fclick = true;
		//$dob = $_POST['dobyear'].'-'.$_POST['dobmonth'].'-'.$_POST['dobdate'];
		$id=$_POST['id'];
		$form_id=$_POST['form_id'];
		$_SESSION['form_id']=$form_id;
		$district=$_POST['muldist'];
		$block=$_POST['mulblock'];
		$tehsil=$_POST['mulTehsil'];
		$tehsil=trim($tehsil);
		$tehsil=explode(" ",$tehsil);
        $tehsil=implode(",",$tehsil);
		$panchayat=$_POST['mulpanchayat'];
		$village=$_POST['mulvillage'];
		$cvc=$_POST['cvc'];
		$type_scheme=$_POST['rwss'];	
		$name_scheme=$_POST['name_scheme'];
		$year=$_POST['year'];
		$capital_cost=$_POST['capital_cost'];
		if($_POST['scheme_sactioned']!='Other')
		{
			$scheme_sactioned=$_POST['scheme_sactioned'];
		}
		else
		{
			$scheme_sactioned=$_POST['scheme_sactioned_other'];
		}
		$popul_benefited=$_POST['population_benefited1'];
		$present_popul=$_POST['present_population1'];
		$num_source=$_POST['num_source'];
		$hp_no=$_POST['hp_no'];
		$sp_no=$_POST['sp_no'];
		
		//$q1="INSERT INTO tbl_dtls_q1_main(id, form_id, district_id, date, block_id, tehsil_id, panchayat_id, village_id, cvc, type_scheme, name_scheme, year_comm, capital_cost, scheme_sactioned, population_benefited, present_population, no_sources, hp_nos, sp_nos, post_date) VALUES ('$id', '$form_id', '$district', '$dob','$block', '$tehsil', '$panchayat', '$village', '$cvc', '$type_scheme', '$name_scheme', '$year', '$capital_cost', '$scheme_sactioned', '$popul_benefited', '$present_popul', '$num_source', '$hp_no', '$sp_no', NOW())"; 
		echo $q1="UPDATE tbl_dtls_q1_main SET name_scheme='$name_scheme', year_comm='$year', capital_cost='$capital_cost', scheme_sactioned='$scheme_sactioned', no_sources='$num_source', hp_nos='$hp_no', sp_nos='$sp_no' where id=$formId";
		
		$r1=mysql_query($q1);
			if($r1)
			{
				//header('Location: critical_form2.php');
				$relocatePage=true;
				//echo "success 1";		
			}
			else 
			{
				$errorIns="Error inserting RWSS table <br>";
			}
		$q2="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where village_id IN($village) order by habitation_code";
		$r2=mysql_query($q2);
		$num_rows = mysql_num_rows($r2);
		//$_SESSION['num_rows']=$num_rows;
		//echo $num_rows;
		$q3="SELECT id FROM tbl_dtls_q1_main where form_id='$formId'";
		$r3=mysql_query($q3);
		$x=mysql_fetch_array($r3);
		$loc_id=$x['id'];
		$_SESSION['loc_id']=$loc_id;
		for($i=1; $i<=$num_rows; $i++)
		{
			$hname = 'name_habi'.$i;
			$hcode = 'habi_code'.$i;
			$type_habit='type_habit'.$i;
			$status = 'status'.$i;
			
			$hname=$_POST[$hname];	
			$hcode=$_POST[$hcode];
			$type_habit=$_POST[$type_habit];
			$status=$_POST[$status];
			
			//$q4="INSERT INTO tbl_dtls_q1_oh(loc_id, habit_name, habit_code, type_habit, status_e_nt) VALUES ('$loc_id', '$hname', '$hcode', '$type_habit', '$status')";
			echo $q4="UPDATE tbl_dtls_q1_oh SET status_e_nt='$status' where loc_id=$formId and habit_code=$hcode";
			$r4=mysql_query($q4);	
		}	
		
		if($r4)
			{
				$relocatePage=true;
				//header('Location: critical_form2.php');
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting habit table <br>";
			}
			
		echo $qr="Delete from tbl_dtls_q1_sws where loc_id=$formId";
		$res=mysql_query($qr);	
		for($i=1; $i<=$num_source; $i++)
		{
			$source='source'.$i;
			$yield_min='yield_min'.$i;
			$yield_max='yield_max'.$i;
			$water_table_min='water_table_min'.$i;
			$water_table_max='water_table_max'.$i;
			$current_status='current_status'.$i;
			
			$source=$_POST[$source];
			$yield_min=$_POST[$yield_min];
			$yield_max=$_POST[$yield_max];
			$water_table_min=$_POST[$water_table_min];
			$water_table_max=$_POST[$water_table_max];
			$current_status=$_POST[$current_status];
			
			echo $q5="INSERT INTO tbl_dtls_q1_sws(loc_id, source, yield_min, yield_max, water_table_min, water_table_max, current_status) VALUES ('$loc_id', '$source', '$yield_min', '$yield_max', '$water_table_min', '$water_table_max', '$current_status')";
				$r5=mysql_query($q5);	
		}	
		if($r5)
			{
				$relocatePage=true;
			}
			else 
			{
				$errorIns.="Error inserting sws table <br>";
			}	
			
			if($errorIns==0) 
			{
				header('Location: editquestionnaire1_2.php');
			}
			else 
			{
				echo $errorIns;exit;
			}					
}
else
{
	$fclick = false;
	$flag=0;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="js/validate1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxEditForm_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction1_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/editajaxFunction1_q1.js"></script>
<script language=javascript>
function mult()
{
	var value1=document.getElementById('popul_benefited').value;
	var value2=Math.round(value1 * 1.29);
	//var value2=Math.round(value1 * 1.4);
	document.getElementById('present_popul').value=value2;	
}
function mult2()
{
	var value1=document.getElementById('factor1').value;
	var value2=document.getElementById('population_benefited1').value;
	var value3=Math.round(value1 * value2);
	document.getElementById('present_population1').value=value3;
	alert('Value of Population Benefited Field is '+ value2 +', Present Population is '+ value3 +' and Population Factor is ' + value1);	
}
</script>
<title>Edit RWSS Scheme</title>
</head>
<body onLoad="<?php echo $jsOnLoad;?>">
<div align="center">
<form action="" method="post" enctype="multipart/form-data">
	<table border="0" width="802" id="table1" cellspacing="0" cellpadding="0" style="padding:10px;">
		<tr>
			<td height="30">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			RWSS Scheme</font></td>
		</tr>
		
		<tr>
			<td align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">Page 1</font></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td background="images/title.gif" height="22"><font color="#ffffff">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			Main Location </font></font>
			</td>
		</tr>
		<tr>
			<td height="66">
				<table border="0" width="800" id="table2" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
					
					<tr>
						<td width="157" height="25">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color=                            "#FF0000">&nbsp;&nbsp;*</font>District</font>						</td>
						<td width="270"><textarea id="district" readonly="readonly" name="district"><?php $id="$row[district_id]"; echo getName('district',$id);?></textarea></td>
						
						<td width="111">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color=                            "#FF0000">*</font>Date&nbsp;&nbsp;</font>
						</td>
            			<td width="207"><?php //dpulldown('dob',$getdate['mday'],$getdate['mon'],$getdate['year']);?>
						 <input type="text" name="date" id="date" size="30" height="18" class="txt" value="<?php echo $row['date'];?>" readonly></td>
					</tr>
					<tr>
						<td width="157" height="28">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;
							<font color="#FF0000">*</font>Block </font></td>
							<td width="270"><textarea id="block" readonly="readonly" name="block"><?php $id="$row[block_id]"; echo getName('block',$id);?></textarea></td>
						
						<td width="111">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color=                        	"#FF0000">*</font>Revenue &nbsp;&nbsp;Tehsil&nbsp;&nbsp;&nbsp;</font>
						</td>
						<td width="270"><textarea id="tehsil" readonly="readonly" name="tehsil"><?php $id="$row[tehsil_id]"; echo "$row1[census_subdistrict_name]"?></textarea></td>
						
			    	</tr>
				</table>
		  </td>
		</tr>
		<tr>
			<td><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td background="images/title.gif" height="22"><font color="#ffffff">&nbsp;
				</font><span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt" color="#ffffff">&nbsp;1. Scheme 
				Details</font></span>
			</td>
		</tr>
		<tr>
			<td><span style="font-size: 3pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td>
			<table width="800" height="159" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" id="table6">
				<tr>
					<td height="9" colspan="2"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="270" height="28">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						Type of the Scheme (As of Now)</font>					</td>
					<td width="477"><label id="type_scheme"><font style="font-size: 8.5pt" face="Verdana">&nbsp;<?php echo "$row[type_scheme]";?></font></label></td>
				</tr>
				
				<tr>
					<td width="270" height="26">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Name of the Schemes </font></td>
					<td width="477"><input type="text" name="name_scheme" id="name_scheme" size="50" height="18" class="txt" value="<?php echo $row['name_scheme'];?>"></td>
				</tr>
				<tr>
					<td width="270" height="31">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Year of Commissioning</font></td>
					<td width="477">
						<select size="1" name="year" id="year" class="txt">
						<option selected value="0">Not Provided</option>
						<?php 
						foreach($year_comm as $key=>$val)
						{
							if($row['year_comm']==$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						?>
						</select></td>
				</tr>
				<tr>
					<td width="270" height="28">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Capital Cost (in <img src="images/26rup1.jpg" width="10"> Lakh)</font></td>
						<!--<font face="Rupee Foradian" size="3">`</font>-->
					<td width="477">
						<input type="text" name="capital_cost" id="capital_cost" size="30" height="18" class="txt" onBlur="float(this)" value="<?php echo $row['capital_cost'];?>"></td>
				</tr>
				<tr>
					<td width="270" height="31">&nbsp;
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Schemes Sanctioned Under </font>					</td>
					<td width="477"><select size="1" name="scheme_sactioned" id="scheme_sactioned" class="txt" onChange="enable_sanc1(true)">
                      <option selected value="0">Select Scheme</option>
                      <?php 
						foreach($scheme as $key=>$val)
						{
							$val1=$row['scheme_sactioned'];
						if($val1=='State-Plan-(Old-MNP)' || $val1=='NRDWP-(Old-ARDWP)' || $val1=='Swajal-Dhara-&-Sector-Reform')
						{
							if($val1==$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						if($val1!='State-Plan-(Old-MNP)' && $val1!='NRDWP-(Old-ARDWP)' && $val1!='Swajal-Dhara-&-Sector-Reform')
						{
							if($val1!=$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						}
						?>
                    </select></td>
			  </tr>
			  <tr>
				  <td width="270" height="26">&nbsp;</td>
					<td width="477">
						 <font style="font-size: 8pt" face="Verdana" color="#000000"> If Other then specify&nbsp;</font><input type="text" name="scheme_sactioned_other" id="scheme_sactioned_other" value="<?php if($row['scheme_sactioned']!='State-Plan-(Old-MNP)' && $row['scheme_sactioned']!='NRDWP-(Old-ARDWP)' && $row['scheme_sactioned']!='Swajal-Dhara-&-Sector-Reform'){ echo $row['scheme_sactioned']; } else echo ''; ?>" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<span style="font-size: 5pt">&nbsp;</span>
		</td>
	</tr>
	<tr>
		<td background="images/title.gif" height="22"><font color="#ffffff">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			2. Location </font></font>
		</td>
	</tr>
	<tr>
		<td>
			<table border="0" width="800" id="table7" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td height="11" colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="287" height="29" valign="top">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;&nbsp;<font color="#FF0000">*</font>Grampanchayat</font></td>
						<td width="504"><textarea id="gp" readonly="readonly" name="gp" rows="5" cols="20"><?php  $id="$row[panchayat_id]"; echo getName('panchayat',$id);?></textarea></td>
					
				</tr>
				<tr>
					<td width="287" valign="top">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Village (s) Covered Names (MH)</font></td>
						<td width="504"><textarea id="village" readonly="readonly" name="village" rows="5" cols="20"><?php $id="$row[village_id]"; echo getName('village',$id);?></textarea></td>
				</tr>
				<tr>
					<td width="287" height="24" valign="top">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Form Id</font></td>
					<td width="512">
						<input type="text" size="23" name="form_id" id="form_id" class="txt" value="<?php echo $row['form_id'];?> " readonly></td>
				</tr>
				<tr>
					<td width="287" height="28" valign="top">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Census Village Code</font></td>
					<td width="512"><textarea id="cvc" readonly="readonly" rows="5" cols="20" name="cvc"><?php echo $row['cvc'];?></textarea></td>
				</tr>
				<tr>
		<td>&nbsp;</td>
	</tr>
				<tr>
					<td colspan="4" background="images/title.gif">&nbsp;
					<font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#ffffff">
					3.Other Habitations (OH) covered</font></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table border="0" width="800" id="table4" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
				<tr>
					<td colspan="4"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td align="center" width="31%" bgcolor="#CCCCCC" height="36">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Name of OH</font></td>
					<td align="center" width="24%" bgcolor="#CCCCCC" height="36">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Code No. (As per IMIS)</font></td>
						<td align="center" width="17%" rowspan="" bgcolor="#CCCCCC">
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Type MH/ OH</font></td>
					<td align="center" width="28%" bgcolor="#CCCCCC" height="36">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Actual Status at Site (E/NT)</font></td>
				</tr>	
				<?php
				 $qr2="select * from tbl_dtls_q1_oh where loc_id='$formId'";
				$res2=mysql_query($qr2);
				$i=1;
				while($row2=mysql_fetch_array($res2))
				{
				?>
				 <tr>
				<td width="31%" height="23" align="center"><input type="text" name="name_habi<?php echo $i;?>" id="name_habi<?php echo $i;?>" value="<?php echo ucwords(strtolower($row2['habit_name']));?>" class="txt7" readonly /></td>
				<td width="24%" align="center"><input type="text" name="habi_code<?php echo $i;?>" id="habi_code<?php echo $i;?>" value="<?php echo $row2['habit_code'];?>" class="txt7" readonly></td>
			   	<td align="center" width="17%"><input type="text" name="type_habit<?php echo $i;?>" id="type_habit<?php echo $i;?>" value="<?php echo $row2['type_habit'];?>" size="2" class="txt_1" readonly/></td>
				<td width="28%" align="center"><input type="radio" name="status<?php echo $i;?>" id="status<?php echo $i;?>" value="Existing" <?php echo  ($row2['status_e_nt']=='Existing')?'checked':'';?> onClick="setEnable(this.value,<?php echo $i; ?>)"><font style="font-size: 8.5pt" face="Verdana" color="#000000">E</font>
					<input type="radio" name="status<?php echo $i;?>" id="status<?php echo $i;?>" onClick="setReadOnly(this.value,<?php echo $i; ?>)" value="NON TRACABLE" <?php echo  ($row2['status_e_nt']=='NON TRACAB')?'checked':'';?>><font style="font-size: 8.5pt" face="Verdana" color="#000000">NT</font></td>
				</tr>
			<?php $i++; } ?>
			</table>
		</td>
	</tr>
	<tr><td>&nbsp;</td></tr>
	<?php /*$qr="Select * From tbl_dtls_q1_unhabit where loc_id='$id1'";
	$res=mysql_query($qr);
	$num_unlisted = mysql_num_rows($res);*/ ?>
	<!--<tr>
		  <td height="22" colspan="2" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#000000">&nbsp;No. of Unlisted Habitation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="num_unhabit" id="num_unhabit" value="<?php //echo $num_unlisted; ?>" class="txt5" onBlur="showunhabit();numeric(this)">
			</font></td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
			<td colspan="3"><div id="show_unhabit"></div></td>
		</tr>-->
	<tr>
		<td width="802" background="images/title.gif">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#ffffff">4. Population</font></span></td>
	</tr>
	<tr>
		<td height="47">
			<table border="0" width="800" id="table8" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
	<tr>
				
					<td width="165">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Population Benefited </font>					</td>
					<td width="209">
				    <input type="text" class="txt5" name="population_benefited" id="population_benefited" onBlur="numeric(this)" size="20" value="<?php echo $row['population_benefited'];?>" readonly>
				  	</td>
					<td width="126">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Present Population&nbsp;&nbsp;&nbsp; </font></td>
				  <td width="295">
					<input type="text" size="20" class="txt5" name="present_population" id="present_population" value="<?php echo $row['present_population'];?>" readonly>
				</tr>
				<tr>
					<td height="18" colspan="4">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;(as per 2001 census)</font></td>
				</tr>
		</table>		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>

	<tr>
		<td width="802" background="images/title.gif">&nbsp;<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#ffffff">5. Sources of Water Supply</font></span>		</td>
	</tr>
	<tr>
		<td colspan="6">
			<table border="0" width="800" id="table10" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="172">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						No. of Sources</font></td>
				  <td width="625" colspan="3"><input type="text" name="num_source" id="num_source" size="20" onBlur="source_dtls();numeric(this)" class="txt5" value="<?php echo $row['no_sources'];?>" ></td>
				</tr>
				<tr>
					<td colspan="4">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;</font></td>
				</tr>
				
				<tr>
					<td colspan="6"><div id="source_dtls"></div></td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td width="802" background="images/title.gif">&nbsp;
			<span style="font-weight: 700"><font face="Arial" style="font-size: 8.5pt" color="#ffffff">6. Hand pumps &amp; Single Phase pumps installed (on above	mentioned if any)            </font></span>		</td>
	</tr>
	<tr>
		<td height="57">
			<table border="0" width="800" id="table11" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="189" height="21">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						HP Nos.</font>					</td>
					<td width="622" colspan="3">
				  <input type="text" name="hp_no" size="20" class="txt5" onBlur="numeric(this)" value="<?php echo $row['hp_nos'];?>">					</td>
				</tr>
				<tr>
					<td width="189" height="21">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						SP Nos.</font>					</td>
					<td width="622" colspan="3">
				  <input type="text" name="sp_no" size="20" class="txt5" onBlur="numeric(this)" value="<?php echo $row['sp_nos'];?>">					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>
			<p align="center">
			<!--<input type="submit" value="Back" name="back" style="font-size: 8pt;font-family:Verdana; border-style: solid; border-width: 1px">&nbsp;&nbsp;-->
			<input type="submit" value="Click for Continue" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px; font-weight:bold; background:#666666; color:#FFFFFF; width:140px; height:30px" onClick="return validate1()">&nbsp;</p>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
</form>		
</div>
</body>
</html>
